import type { AppRouteModule } from '/@/router/types';

import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const partManager: AppRouteModule = {
  path: '/partManager',
  name: 'partManager',
  component: LAYOUT,
  redirect: '/partManager/partWorkPlace',
  meta: {
    orderNo: 5,
    icon: 'ion:paper-plane-outline',
    title: t('routes.demo.documentManager.partManager'),
  },
  children: [
    {
      path: 'partWorkPlace',
      name: 'partWorkPlace',
      meta: {
        title: t('routes.demo.documentManager.partWorkPlace'),
        ignoreKeepAlive: false,
      },
      component: () => import('/@/views/demo/partManager/index.vue'),
    },
    {
      path: 'productStructure/:id/:version',
      name: 'productStructure',
      meta: {
        title: t('routes.demo.system.productStructure'),
        ignoreKeepAlive: false,
      },
      component: () => import('/@/views/demo/partManager/productStructure.vue'),
    },
    {
      path: 'productDesign',
      name: 'productDesign',
      meta: {
        title: t('routes.demo.system.productDesign'),
        ignoreKeepAlive: false,
      },
      component: () => import('/@/views/demo/partManager/productDesign.vue'),
    },
  ],
};

export default partManager;
